<template>
	<smpPanel title="ESB环境信息">
		<div class="smp-search smp_panel_1">
			<div class="smp_panel_header">
				<div class="smp_panel_pre"></div>
				<div class="smp_panel_title">测试环境</div>
			</div>
			<div class=" smp_panel_body">
				<el-table :data="list" size="mini" stripe border style="width: 100%">
					<!-- <el-table-column prop="envType" label="环境类别"  align="center">
					</el-table-column> -->
					<el-table-column type="index" label="序号"  align="center" width="200">
					</el-table-column>
					<el-table-column prop="machType" label="机器类别"  align="center">
					</el-table-column>
					<el-table-column prop="esbType" label="内外联类别"  align="center">
					</el-table-column>
					<el-table-column prop="Ip" label="环境地址"  align="center">
					</el-table-column>
					<el-table-column prop="remark" label="备注"  align="center">
					</el-table-column>
				</el-table>
			</div>
		</div>
		
		<div class="smp-search smp_panel_1">
			<div class="smp_panel_header">
				<div class="smp_panel_pre"></div>
				<div class="smp_panel_title">生产环境</div>
			</div>
			<div class=" smp_panel_body">
				<el-table :data="list1" size="mini" stripe border style="width: 100%" :span-method="objectSpanMethed">
					<el-table-column type="index" label="序号"  align="center" width="200">
					</el-table-column> 
					<el-table-column prop="esbType" label="内外联类别"  align="center">
					</el-table-column>
					<el-table-column prop="machType" label="机器类别"  align="center">
					</el-table-column>
					<el-table-column prop="Ip" label="环境地址"  align="center">
					</el-table-column>
					<el-table-column prop="remark" label="备注"  align="center" width="250">
					</el-table-column>
				</el-table>
			</div>
		</div>
	</smpPanel>
	
	
</template>

<script>
	export default {
		data(){
			return {
				list:[
					{"machType":"实体机","esbType":"内联ESB","Ip":"10.0.91.15","remark":"默认环境"},
					{"machType":"实体机","esbType":"内联ESB","Ip":"10.0.91.196","remark":""},
					{"machType":"实体机","esbType":"内联ESB","Ip":"10.0.84.161","remark":"年结"},
					{"machType":"实体机","esbType":"内联ESB","Ip":"10.0.91.173","remark":"压测"},
					{"machType":"实体机","esbType":"内联ESB","Ip":"10.0.91.23","remark":"压测"},
					{"machType":"实体机","esbType":"外联ESB","Ip":"10.0.91.132","remark":"默认环境"},
					{"machType":"实体机","esbType":"外联ESB","Ip":"10.0.91.166","remark":"准生产"},
				],
				list1:[
					{"machType":"实体机","esbType":"内联ESB","Ip":"10.0.129.213","remark":"服务方网络请开通所有实体机IP到服务方网络"},
					{"machType":"实体机","esbType":"内联ESB","Ip":"10.0.129.214","remark":""},
					{"machType":"实体机","esbType":"内联ESB","Ip":"10.0.129.216","remark":""},
					{"machType":"实体机","esbType":"内联ESB","Ip":"10.0.129.244","remark":""},
					{"machType":"实体机","esbType":"内联ESB","Ip":"10.0.129.245","remark":""},
					{"machType":"实体机","esbType":"内联ESB","Ip":"10.0.129.246","remark":""},
					{"machType":"实体机","esbType":"内联ESB","Ip":"10.0.129.247","remark":""},
					{"machType":"实体机","esbType":"内联ESB","Ip":"10.0.129.207","remark":""},
					{"machType":"实体机","esbType":"内联ESB","Ip":"10.0.129.208","remark":""},
					{"machType":"实体机","esbType":"内联ESB","Ip":"10.0.91.209","remark":""},
					{"machType":"负载","esbType":"内联ESB","Ip":"10.0.129.217","remark":"请求方请开通请求方IP到ESB负载网络"},
				
					{"machType":"实体机","esbType":"外联ESB","Ip":"10.0.208.32","remark":"服务方网络请开通所有实体机IP到服务方网络"},
					{"machType":"实体机","esbType":"外联ESB","Ip":"10.0.208.33","remark":""},
					{"machType":"负载","esbType":"外联ESB","Ip":"10.0.129.62","remark":"请求方请开通请求方IP到外联ESB负载网络"},
					
				]
			}
			
		},
		methods:{
			objectSpanMethed({row,column,rowIndex,columnIndex}){
				if(columnIndex===4){
					if(rowIndex===0){
						return {
							rowspan:10,
							colspan:1
						}
					}else if(rowIndex===10){
						return {
							rowspan:1,
							colspan:1
						}
					}else if(rowIndex===11){
						return {
							rowspan:2,
							colspan:1
						}
					}else if(rowIndex===13){
						return {
							rowspan:1,
							colspan:1
						}
					}else{
						return {
							rowspan:0,
							colspan:0
						}
					}
				}
			}
		}
	}
	
</script>

<style>
</style>